﻿ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WcfServer.Classes.Utility;

namespace WcfServer.Classes.Client
{
    [Serializable]
    public class InitMsgWrapper
    {
        public bool IsDirect { set; get; }
        public byte[] EncryptedMessageContent { set; get; } // it will be of type direct initiator if isdirect is true and of type userresponse(targettoken) if isdirect is false

        public InitMsgWrapper(byte[] data)
        {
            var ini = SerializerHandler<InitMsgWrapper>.DeSerializeInput(data);
            this.IsDirect = ini.IsDirect;
            this.EncryptedMessageContent = ini.EncryptedMessageContent;
        }

        public InitMsgWrapper() { }

        public byte[] Send()
        {
            var ini = SerializerHandler<InitMsgWrapper>.SerializeInput(this);
            return ini;
        }
    }
}
